package com.ticket.sass.common.entity.tenant;

import com.baomidou.mybatisplus.annotation.*;
import com.ticket.sass.common.entity.tenant.enums.OrderCommodityTakeStatus;
import com.ticket.sass.common.entity.tenant.enums.OrderPayStatus;
import com.ticket.sass.common.entity.tenant.enums.OrderPayType;
import com.ticket.sass.common.entity.tenant.enums.OrderStatus;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.math.BigDecimal;
import java.time.LocalDateTime;

@Data
@EqualsAndHashCode(callSuper = false)
@TableName("shop_orders")
public class ShopOrderEntity {
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    private String orderNo;
    private BigDecimal originalPrice;
    private BigDecimal payPrice;
    private OrderPayType payType;
    private OrderPayStatus payStatus;
    private LocalDateTime payTime;
    private String remark;
    private String takeCode;
    private OrderCommodityTakeStatus takeStatus;

    private Long userId;
    private Long cinemaId;
    private Long tenantId;
    private OrderStatus status;

    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createdAt;
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updatedAt;

    @TableField(select = false)
    @ApiModelProperty(value = "删除时间")
    @TableLogic(value = "null", delval = "now()")
    private LocalDateTime deletedAt;
}
